import React, { Component } from 'react';
import "../assets/css/firstTop.css";

import { Menu, Dropdown,  } from 'antd';

import { connect } from 'react-redux'

const menu = (
  <Menu >
    <Menu.Item>
      <a  key="1" rel="noopener noreferrer"  className="backLogin"  href="/">退出登录</a>
    </Menu.Item>
  </Menu>
);


class FirstTop extends Component {

  render() {
    return (
      <div  className="headTip" >
           <div  className="Dropdown_box" >
                <Dropdown overlay={menu}>
              <a className="ant-dropdown-link   ant-link" href="#">
              {/* {this.props.loginName} */}

               {sessionStorage.getItem("username")}
             </a>
            </Dropdown>
           </div>
         <div  className="longImg_box" >
              <img className="longImg"  src={require('../assets/img/herdprotrait.png')} alt=""/>
        </div>
      </div>
    );
  }
}



const mapState = (state) => ({
	loginName: state.loginName,
});

const mapDispatch = (dispatch) => ({

  

});

// 没有涉及到路由；所以说和登录页面写的不一样；
export default connect(mapState, mapDispatch)(FirstTop);













